package org.course.weather.task;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class BaiduAPIResp {
    CLocation location;
    CNow now;
}

@Data
class CLocation {
    String country; // 国家
    String province; // 省份
    String city; // 城市
    String id; //百度接口的城市区域id
}

@Data
class CNow {
    String text; //天气现象
    Integer temp; //气温
    String wind_class; //风力
    String wind_dir; //风向
    @JSONField(format = "yyyyMMddHHmmss")
    LocalDateTime uptime; //更新时间 20231010151500
}